package cn.gqr.service;

import cn.gqr.entity.*;
import com.baomidou.mybatisplus.extension.service.IService;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;
import java.util.Map;

/**
 * @author gqr
 * @company null
 * @create 2022-06-12 17:07
 */
public interface OrderService extends IService<Order> {


    /**根据订单id添加快递单号*/
    boolean insertCourierNumberByOrderId(String courierNumber , Integer orderId);

    /**获取所有买家的订单信息和用户信息并且分页,可动态条件查询**/
    Map<String,Object> selectOrderHeaderAndUser(UserOrderVO userOrderVO, int start, int num);

    /**根据订单id,查找订单明细的所有对应书本信息*/
    List<BookOrderDetail> selectBookOrderDetailsByOrderId(int orderId);


    /**获取当前登录用户的所有订单信息并且分页以及条件查询*/
    List<OrderInfo> selectUserOrderAllPage(Integer isPayment,String startingTime,String endTime, int start,int num);

     /**更新收货地址及收货电话*/
    boolean updateAddressAndPhoneByOrderId(Order order);

     /**更新订单付款状态  1已付款，0未付款*/
    boolean updatePaymentStatusByOrderId(Order order);

    /**添加订单已经订单明细**/
    Integer insert(CartOrder cartOrder);





}
